
<%@ page contentType="text/html" %>
<%@ page pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<%@ include file="header.jsp" %>
		<h3>List of closed Rooms</h3>
		<br/>
		
		<table class="dataTable">
			<tr>
				<th> Id			</th>
				<th> Category	</th>
				<th> Started	</th>
				<th> Subscriptions </th>
				<th> See </th>
			</tr>	 
			<c:forEach items="${rooms}" var="r" varStatus="loopStatus">
			<tr class="${loopStatus.index %2 == 0 ? 'even' :  'odd'}">
				<td class="left"> <c:out value="${r.id}"/> </td>
				<td class="left"> <c:out value="${r.category.name}"/> </td>
				<td> <c:out value="${r.niceTime}"/> </td>
				<td> <c:out value="${r.qtyActiveSubscriptions}"/> </td>
				<td class="center"> 
					<a href="../admin/viewClosedRoom?id=<c:out value="${r.id}"/>">
						<img src="../../resources/details.png" title="Details"/>
					</a>
					<a href="../csv/getRoomHistory?id=<c:out value="${r.id}"/>">
						<img src="../../resources/csv.png" title="Download csv file"/>
					</a>	
				</td>
			</tr>
			</c:forEach>
		</table>
<%@ include file="footer.jsp" %>